package http

import (
	sessionHandler "gitee.com/zaiqiang231/go-base-session/app/http/handler"
	httpHandler "gitee.com/zaiqiang231/go-base-sms/app/http/handler"
	"github.com/gin-gonic/gin"
)

func InitRouter(g *gin.Engine) {
	g.Use(gin.Logger(), gin.Recovery())
	//跨域 设置
	g.Use(sessionHandler.Cors())
	//原子参数
	g.Use(sessionHandler.AtomFunc)

	sms := g.Group("/sms", httpHandler.AuthCheckFunc)
	{
		sms.POST("/setWhite", httpHandler.SetWhite)
		sms.POST("/deleteWhiteList", httpHandler.DeleteWhiteList)
		sms.POST("/getWhiteList", httpHandler.GetWhiteList)
	}
}
